package com.tinycloud.miracll.product.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tinycloud.miracll.product.mapper.ScadaAlarmMapper;
import com.tinycloud.miracll.product.domain.ScadaAlarm;
import com.tinycloud.miracll.product.service.IScadaAlarmService;

/**
 * Scada报警Service业务层处理
 * 
 * @author tiny
 * @date 2021-12-10
 */
@Service
public class ScadaAlarmServiceImpl implements IScadaAlarmService 
{
    @Autowired
    private ScadaAlarmMapper scadaAlarmMapper;

    /**
     * 查询Scada报警
     * 
     * @param projNodeId Scada报警主键
     * @return Scada报警
     */
    @Override
    public ScadaAlarm selectScadaAlarmByProjNodeId(Long projNodeId)
    {
        return scadaAlarmMapper.selectScadaAlarmByProjNodeId(projNodeId);
    }

    /**
     * 查询Scada报警列表
     *
     * @param scadaAlarm Scada报警
     * @return Scada报警
     */
    @Override
    public List<ScadaAlarm> selectScadaAlarmList(ScadaAlarm scadaAlarm)
    {
        return scadaAlarmMapper.selectScadaAlarmList(scadaAlarm);
    }

    /**
     * 新增Scada报警
     *
     * @param scadaAlarm Scada报警
     * @return 结果
     */
    @Override
    public int insertScadaAlarm(ScadaAlarm scadaAlarm)
    {
        return scadaAlarmMapper.insertScadaAlarm(scadaAlarm);
    }

    /**
     * 查询Scada报警列表
     *
     * @param scadaAlarm Scada报警
     * @return Scada报警
     */
    @Override
    public List<ScadaAlarm> getNoCleanScadaAlarmList()
    {
        return scadaAlarmMapper.getNoCleanScadaAlarmList();
    }

    /**
     * 修改Scada报警
     * 
     * @param scadaAlarm Scada报警
     * @return 结果
     */
    @Override
    public int updateScadaAlarm(ScadaAlarm scadaAlarm)
    {
        return scadaAlarmMapper.updateScadaAlarm(scadaAlarm);
    }

    /**
     * 批量删除Scada报警
     * 
     * @param projNodeIds 需要删除的Scada报警主键
     * @return 结果
     */
    @Override
    public int deleteScadaAlarmByProjNodeIds(Long[] projNodeIds)
    {
        return scadaAlarmMapper.deleteScadaAlarmByProjNodeIds(projNodeIds);
    }

    /**
     * 删除Scada报警信息
     * 
     * @param projNodeId Scada报警主键
     * @return 结果
     */
    @Override
    public int deleteScadaAlarmByProjNodeId(Long projNodeId)
    {
        return scadaAlarmMapper.deleteScadaAlarmByProjNodeId(projNodeId);
    }
}
